﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/BMP_List.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Pages_BdNews_Default" %>
<asp:Content ID="contentHeader" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="contentSearch" ContentPlaceHolderID="contentPlaceHolderToolBar" runat="Server">
   <asp:DropDownList ID="ddlHostName" runat="server" Field="hostname" Opt="=" Width="160px"></asp:DropDownList>
标题
  <asp:TextBox runat="server" ID="bdNews_NewsTitle" Field="NewsTitle" Opt="%">
    </asp:TextBox>
   
    创建日期
    <asp:TextBox ID="fromData" runat="server" Field="CreateDate" Opt="&#62;=" onFocus="GetMaxDate('toData');"
        ClientIDMode="Static" Width="80">
    </asp:TextBox>
    至
    <asp:TextBox ID="toData" runat="server" Field="CreateDate" Opt="&#60;=" onFocus="GetMinDate('fromData');"
        ClientIDMode="Static" Width="80">
    </asp:TextBox>
    
    每页显示 <asp:TextBox runat="server" ID="txtPageSize" Text="20"  Width="50" >
    </asp:TextBox>
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <asp:GridView ClientIDMode="Static" ID="gvInfos" runat="server" >
        <Columns>
		<asp:TemplateField  ItemStyle-Width="50">
            <HeaderTemplate>
                <input id="cbhALL" type="checkbox" onclick="SelectAll('gvInfos', this, 'cbItem');" /><label
                    for="cbhALL"></label>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="cbItem" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>	
          <asp:BoundField DataField="hostname" SortExpression="hostname" HeaderText="网站" />	
		<asp:BoundField DataField="NewsTitle" SortExpression="NewsTitle" HeaderText="标题" />		
		<asp:TemplateField SortExpression="IsPublish" HeaderText="是否发布"> <ItemTemplate><%# Eval("IsPublish") != null && Eval("IsPublish").ToString().ToLower() == "true" ? "是" : "否"%></ItemTemplate><EditItemTemplate><asp:CheckBox runat="server" ID="BdNewsInfo_IsPublish" Checked='<%# Eval("IsPublish") != null && Eval("IsPublish").ToString().ToLower() == "true" ? true : false %>' /></EditItemTemplate></asp:TemplateField>		
        <asp:TemplateField SortExpression="IsHeaderLine" HeaderText="是否头条"> <ItemTemplate><%# Eval("IsHeaderLine") != null && Eval("IsHeaderLine").ToString().ToLower() == "true" ? "是" : "否"%></ItemTemplate><EditItemTemplate><asp:CheckBox runat="server" ID="BdNewsInfo_IsHeaderLine" Checked='<%# Eval("IsHeaderLine") != null && Eval("IsHeaderLine").ToString().ToLower() == "true" ? true : false %>' /></EditItemTemplate></asp:TemplateField>		
		<asp:TemplateField SortExpression="CreateDate" HeaderText="创建时间"><ItemTemplate><%# Eval("CreateDate")%></ItemTemplate><EditItemTemplate><asp:TextBox runat="server" ID="BdNewsInfo_CreateDate" onclick="WdatePicker();" Text='<%# Eval("CreateDate")%>' /></EditItemTemplate> </asp:TemplateField>		
		<asp:TemplateField SortExpression="PublishDate" HeaderText="发布日期"><ItemTemplate><%# Eval("PublishDate")%></ItemTemplate><EditItemTemplate><asp:TextBox runat="server" ID="BdNewsInfo_PublishDate" onclick="WdatePicker();" Text='<%# Eval("PublishDate")%>' /></EditItemTemplate> </asp:TemplateField>		
         <asp:HyperLinkField HeaderText="预览" Text="预览" DataNavigateUrlFields="DetailHTMLURI"
            ItemStyle-Width="50" Target="_blank" />
        <asp:TemplateField HeaderText="删除" ItemStyle-Width="50">
        <ItemTemplate>
        <asp:LinkButton ID="lbDelete" Text="删除" CausesValidation="true" CommandName="Delete"
                    OnClientClick="return confirm('确定删除吗？');" runat="server">
        </asp:LinkButton>
        </ItemTemplate>
        </asp:TemplateField>
        <asp:HyperLinkField HeaderText="修改" Text="修改" DataNavigateUrlFields="ManageEditURI"
            ItemStyle-Width="50" />			
        </Columns>
    </asp:GridView>
</asp:Content>
